//
//  SDPhotoBrowser.h
//  photobrowser
//
//  Created by aier on 15-2-3.
//  Copyright (c) 2015年 aier. All rights reserved.
//

#import <UIKit/UIKit.h>



@class SDButton, SDPhotoBrowser;

@protocol SDPhotoBrowserDelegate <NSObject>

@required

- (UIImage *)photoBrowser:(SDPhotoBrowser *)browser placeholderImageForIndex:(NSInteger)index;

@optional

- (NSURL *)photoBrowser:(SDPhotoBrowser *)browser highQualityImageURLForIndex:(NSInteger)index;


/**
 删除图片
 */
- (void)photoBrowser:(SDPhotoBrowser *)browser removePhoto:(NSInteger)index;

@end


@interface SDPhotoBrowser : UIView <UIScrollViewDelegate>

typedef void(^deleteImageCallBack)(NSInteger index);


/**
 保存
 */
@property (nonatomic, weak) UIButton *saveBtn;

/**
 删除
 */
@property (nonatomic, weak) UIButton *removeBtn;

@property (nonatomic, weak) UIView *sourceImagesContainerView;
@property (nonatomic, assign) NSInteger currentImageIndex;
@property (nonatomic, assign) NSInteger imageCount;
@property (nonatomic, weak) id<SDPhotoBrowserDelegate> delegate;

- (void)show;


@end
